#ifndef _CRC_16_H
#define _CRC_16_H

#define PACK_HEAD 0xfefb

void CRC16_MODBUS_m(unsigned short *crc16_reg, unsigned char *puchMsg, unsigned int usDataLen);
void InvertUint16(unsigned short *DesBuf, unsigned short *SrcBuf);

int findCommand(unsigned char * buff, int lengthIn);

enum e_command
{
	heart_beat,
	ask_download,
	download_complete,
	update_success,
	update_failed,
	num_command
};

extern char * command_info[num_command];
#endif